/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package stis.statpro.ibs.widget;

import java.awt.AlphaComposite;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.geom.RoundRectangle2D;
import javax.swing.ImageIcon;
import javax.swing.JPanel;

/**
 *
 * @author habib <imamhabibpamungkas@gmail.com>
 */
public class WidgetPanelInsertC extends JPanel{

    public WidgetPanelInsertC() {
        setLayout(new BorderLayout());
    }

    public void setImage(){
        
    }
    
    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g); //To change body of generated methods, choose Tools | Templates.
        Graphics2D gd = (Graphics2D) g.create();
        gd.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        Image gambar = new ImageIcon(getClass().getResource("/stis/statpro/ibs/icon/Quest03.png")).getImage();
        RoundRectangle2D rectangle2D = new RoundRectangle2D.Double(0, 0, getWidth(), getHeight(), 10, 10);

        
        GradientPaint gp = new GradientPaint(0, 0, new Color(150,120,110,0), getWidth(), getHeight(), new Color(150, 110, 200));
        gd.setComposite(AlphaComposite.SrcOver.derive(0.5F));
        gd.setPaint(gp);
        gd.fill(rectangle2D);
        gd.drawImage(gambar, 0, 0,getWidth(),getHeight(), null);
        gd.dispose();
    }
    
}
